package com.yuchengtech.simpleServer.action;

import com.wox.action.WoxAction;
import com.yuchengtech.joyWindow.WindowConfig;
import com.yuchengtech.simpleServer.core.SimpleHttpServer;

public class InitWindow extends WoxAction {

	private WindowConfig windowConfig;
	@Override
	public String excute() throws Exception {

		if(windowConfig!=null)
		{
			
			//只有传入joyWindow实例，并且不允许多实例才可以用页面改变窗口显示
			if(SimpleHttpServer.getJoyWindow()!=null&&!SimpleHttpServer.isManyInstAllow())
				SimpleHttpServer.getJoyWindow().initWindow(windowConfig);
		}
		return "defalutServlet";
	}
	public WindowConfig getWindowConfig() {
		return windowConfig;
	}
	public void setWindowConfig(WindowConfig windowConfig) {
		this.windowConfig = windowConfig;
	}

	
}
